﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Club.Models.UsersModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>User List</h2>
    <table class="Grid" cellpadding="0" cellspacing="0">
    <thead class = "GridHeader">
        <tr>
            <th><%=Html.SortLink(new GridSortingLinkProperties { IsDefaultSortColumn = true, Text="ID", LinkSortDirection=SortDirection.Ascending,
                                                     SortDirectionKey = "SortDir",
                                                     SortExpression = "ID",
                                                     SortExpressionKey = "SortExpr"
                                           
})%></th>
            <th><%=Html.SortLink(new GridSortingLinkProperties { IsDefaultSortColumn = false, Text="Login ID", LinkSortDirection=SortDirection.Ascending,
                                                     SortDirectionKey = "SortDir",
                                                     SortExpression = "LoginID",
                                                     SortExpressionKey = "SortExpr"
                                                    
})%></th>
            <th><%=Html.SortLink(new GridSortingLinkProperties { IsDefaultSortColumn = false, Text="Full Name", LinkSortDirection=SortDirection.Ascending,
                                                     SortDirectionKey = "SortDir",
                                                     SortExpression = "FullName",
                                                     SortExpressionKey = "SortExpr"
})%></th>
            <th><%=Html.SortLink(new GridSortingLinkProperties { IsDefaultSortColumn = false, Text="Email", LinkSortDirection=SortDirection.Ascending,
                                                     SortDirectionKey = "SortDir",
                                                     SortExpression = "Email",
                                                     SortExpressionKey = "SortExpr"
})%></th>
            <th>Manage</th>            
        </tr>
    </thead>
    <% foreach (DAL.User c in Model.Users)
       { %>
        <tr>
            <td><span><%= c.Id %></span></td>
            <td><span><%= c.Name %></span></td>
            <td><span><%= c.FullName %></span></td>
            <td><span><%= c.Email%></span></td>
            <td><%=Html.ActionLink("Manage","Manage",new {id=c.Id},null)%></td>          
        </tr>
    <% } %>    
</table>
<%= Html.GridPager(new GridPagerProperties { PageKey = "Page", PageSize = Util.CoreConstant.PAGE_SIZE, RecordCount = Model.UserCount })%>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
